package com.coment.message.roles;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum RolesCmd{
    START_Cultivate(1, "开始修炼"),
    STOP_Cultivate(-1, "停止修炼")
    ;
    public final int cmd;
    public final String desc;

    public static RolesCmd fomated(int cmd) {
        for (RolesCmd value : RolesCmd.values()) {
            if (value.cmd == cmd) {
                return value;
            }
        }
        throw new IllegalArgumentException("cmd not found");
    }
}
